package net.cyndeline.components.effect

import net.cyndeline.entitySystem.Component

/**
 * Provides the text that should be printed in the GUI for a specific component.
 * This text could contain instance-specific data such as number of stacks,
 * and cannot be printed without referring to a specific effect instance.
 */
trait EffectDescriptionComponent extends Component {
  
  /** Effect description. */
  //TODO Change to XML, to allow highlighting and coloring words?
  def description: String
  
  /** Sets a new description. */
  def description_=(newDescription: String)
  
}

class EffectDescription extends EffectDescriptionComponent {
  override var description: String = "[Default description]"
  
  override def copy = {
    val copy = new EffectDescription()
    copy.description = description
    copy
  }
}